package workspace;

public class 求1加2加3加到n {
    //public class Solution {
        public int Sum_Solution(int n) {
            //首项加末项乘以项数除以2
            return ((1 + n)*n)/2;
        }
}
